<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.io.*, java.sql.*, java.util.*,LS.*, date.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html>
<html lang="UTF-8">
<style>
th,td {
	padding-bottom: 5px;
	padding-top: 5px;
}

#title{
	font: 17px;
	font-weight:bold;
	text-align: right;
	width: 90px;
}

#result{
	text-align:left;
}

#content{
	text-align: left;
}
#title, #content{
}
.txta{
	width:100%;
	height:100%;
}

#content{

}

b.text{
	font-size: 25px;
	margin-bottom: 10px;
}
h4,h1 {
	margin: 0px;
	padding: 0px;
}
th{
	height:30px;
	border-right: 1px solid #e5e5e5;
	border-bottom: 1px solid #e5e5e5;
}
tr{
	border-bottom: 1px solid #e5e5e5;
}
table {
	width: 100%;
}

.explain{
	color: red;
	font-size: 11px;
	border-bottom: 2px;
}
#outerview {
	padding-top: 10px;
	margin-left: 0px;
	text-align: center;
	background-color: #fff;
	border: 1px solid #e5e5e5;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
#outerview {
	width: 93%;
	min-height: 600px;
	padding: 0px;
}
#middleview{
	width: 90%;
	height: 450px;
	margin: 20px auto 0px auto;
	left: 50%;
	
}
#innerview {
	width: 100%;
 	height: 100%;
 	text-align: center;
	background-color: #fff;
	border: 1px solid #e5e5e5;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
} 

#innerviewleft,#innerviewright{
	margin-left:0px;
	padding-left:0px;
}

#plusview {
	margin:10px;
	margin-bottom:0px;
	text-align: left;
}
.tableview{
	width:100%;
	max-height:100%;
	left:50%;
}

.lendingdate{
	width:20%;
}
.notify{
	width:10%;
}
</style>
<head>
<script src="/LSsystem/assets/js/bootstrap.min.js"></script>

	
	<!-- styles시트 -->
	<link href="/LSsystem/assets/css/bootstrap.css" rel="stylesheet">
	<link rel="stylesheet" href="/LSsystem/assets/css/bootstrap.css">

	<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
	<script type="text/javascript" src="/LSsystem/assets/smartPop/jquery.smartPop.js"></script>
	<link rel="stylesheet" href="/LSsystem/assets/smartPop/jquery.smartPop.css" />
	
</head>
<body>

<div class="container">
			<div id="outerview">
				<div id="middleview">
				
					<div id="plusview" >
							<b class="text">
							${ selectUsersByUserId.user_id }
							${ selectUsersByUserId.name }
							</b>&nbsp;&nbsp;
					</div><br><br>
					
					<div id="innerview">
					<table class="tableview">
						<tr>
							<th class="category">품목</th>
							<th class="modelname">모델</th>
							<th class="no">일련번호</th>
							<th class="lendingdate">대여일</th>
							<th class="returndate">반납예정일</th>
							<th class="state">상태</th>
						</tr>
						<%
							List<vwIELU> list = (List<vwIELU>) request.getAttribute("selectVwIELUByUserId");
						%>

						<c:forEach var="myInfo" items="${selectVwILUAByUserId}">

							<tr class="selectTableItem" id=sample2>

								<td id="iName">${myInfo.getItem_name2()}</td>
								<td id="mName">${myInfo.getModel_name2()}</td>
								<td>${myInfo.getEquipment_id2()}</td>
								<td id="sDate"><fmt:formatDate pattern="yyyy년 MM월 dd일"
										value="${myInfo.lending_start_date}" /></td>
								<td><fmt:formatDate pattern="yyyy년 MM월 dd일"
										value="${myInfo.due_date}" /></td>
								<td>
								<c:if test="${myInfo.lending_R_E == 'L'}">
									<c:choose>
									  <c:when test="${ myInfo.permit != true }">대여 신청 승인 대기중</c:when>
									  <c:when test="${ myInfo.equipment_id == undefined }">대여 신청 승인 완료</c:when>
									  <c:when test="${ myInfo.return_date == null }">대여중</c:when>
									  <c:otherwise>반납 완료</c:otherwise>
									</c:choose>
								</c:if>
								
								<c:if test="${myInfo.lending_R_E == 'E'}">
									<c:choose>
									  <c:when test="${ myInfo.permit != true }">연장 신청 승인 대기중</c:when>
									  <c:otherwise>연장 신청 승인 완료</c:otherwise>
									</c:choose>
								</c:if>
								
								<c:if test="${myInfo.lending_R_E == 'R'}">예약</c:if>
								
								</td>
								<td>
									<form method="post">
										<input type="hidden" name="mName" value="${myInfo.model_name}">
									</form>
								</td>
							</tr>
							
						</c:forEach>

					</table>
				</div>
				</div>
			</div>
		</div>
</body>
</html>